<?php

namespace Database\Factories;

use App\Models\IntervieweeInformation;
use Illuminate\Database\Eloquent\Factories\Factory;

class IntervieweeInformationFactory extends Factory
{

    protected $model = IntervieweeInformation::class;

    /**
     * Define the model's default state.
     *
     * @return array
     */
    public function definition(): array
    {

        if (IntervieweeInformation::first()) {
            return [
                'name'   => $this->faker->lastName,
                'phone'  => $this->faker->regexify('^1[3456789]\d{9}$'),
                'openId' => $this->faker->text(20),
            ];
        }

        return [
            'name'   => '胡维蛟',
            'phone'  => '13688835519',
            'openId' => 'owxLQwpziJnmRWYWzE4-H5CT--28',
        ];
    }
}
